//
//  YZLCarForumDetailViewController.m
//  Car
//
//  Created by dllo on 15/11/2.
//  Copyright © 2015年 岳明. All rights reserved.
//

#import "YZLCarForumDetailViewController.h"

@interface YZLCarForumDetailViewController ()<UIWebViewDelegate>

@property (nonatomic, retain) UIActivityIndicatorView *activityView;

@end

@implementation YZLCarForumDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.title = @"论坛";
    
    self.view.backgroundColor = [UIColor whiteColor];
    UIWebView *web = [[UIWebView alloc] initWithFrame:[UIScreen mainScreen].bounds];
    web.backgroundColor = [UIColor whiteColor];
    NSURL *url = [NSURL URLWithString:self.postLinkStr];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [web loadRequest:request];
    web.delegate = self;
    [self.view addSubview:web];
    
    self.activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
    self.activityView.color = [UIColor lightGrayColor];
    self.activityView.center = web.center;
    [web addSubview:self.activityView];
    [self.activityView startAnimating];
    
    //返回
    [self skipReturnWithTarget:self];
    
    //bar颜色
    [self navigationbarColor];
}

- (void)webViewDidFinishLoad:(UIWebView *)webView {
    
    [self.activityView stopAnimating];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
